package com.jrx.anytxn.customer.dto.customer;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

public class CustomerLabelReq implements Serializable {

    private static final long serialVersionUID = -5012786631834068820L;
    /**
     * 交易流水号
     */
    @NotBlank(message = "流水号不能为空")
    @Size(max=32, message = "交易流水号必须小于32位")
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成")
    @ApiModelProperty(value="交易流水号",example="SN369",required=true)
    private String 	seqNo;

    /**
     * 租户id
     */
    @NotBlank(message = "租户id不能为空")
    @Size(max=4, message = "租户id必须小于4位")
    @ApiModelProperty(value="租户id",example="C692",required=true)
    private String 	tenantId;

    /**
     * 渠道号
     */
    @NotBlank(message = "渠道不能为空")
    @ApiModelProperty(value="渠道号",example="5",required=true)
    @Size(max = 32, message = "渠道号必须小于32位")
    private String 	channel;

    /**
     * 身份证号码
     */
    @Pattern(regexp = RegexConstant.ID_NO, message = "身份证号码格式不正确")
    @ApiModelProperty(value="身份证号码")
    private String idNumber;

    /**
     * 手机号
     */
    @Pattern(regexp = RegexConstant.MOBILE_FORMAT, message = "手机号格式不对，请正确输入")
    @ApiModelProperty(value="手机号")
    private String mobile;

    /**
     * 标签代码
     */
    @NotBlank(message = "标签代码不能为空")
    @ApiModelProperty(value="标签代码",example="10",required=true)
    @Size(max = 10, message = "渠道号必须小于10位")
    private String labelCode;

    /**
     * 生效日期
     */
    @NotNull(message = "生效日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date effectiveDate;

    /**
     * 失效日期
     */
    @NotNull(message = "生效日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expireDate;

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getLabelCode() {
        return labelCode;
    }

    public void setLabelCode(String labelCode) {
        this.labelCode = labelCode;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }
}
